extends ../components/layout
block title
    title 消息
block style
    link(rel='stylesheet', href=__PLUGINS_PATH__ + '/webim/webim_style.css')
block content
    #wrapper
        #header
            include ../components/header
            +commonheader(1)
        #main-wrapper(style='margin-top:10px')
            #chat-wrapper(style='min-height:800px;position:relative;margin-top:10px')
                section(id='main').w100
                    article(id='demo')
                    article(id='components')
    style.
        #wrapper{
            position: fixed !important;
        }
        #main-wrapper {
            margin-top: 0 !important;
        }
        #main-content{
            margin-left: auto !important;
        }
        .webim{
            position: absolute;
             right: 0;
             left: 0;
             margin: auto;
             top: 0;
             bottom: 0;
        }
        .webim-chat{
            max-width: 100%;
            margin: auto;
        }
        .webim-leftbar{
            width: 120px;
            background: #f2f0f0;
        }

        .webim-contact-item.selected{
            background-color: #d5edfe;
        }
        .webim-contact-wrapper{
            width: 185px;
        }
        .webim-profile-avatar{
            /*display: none;*/
        }
        .webim-avatar-icon{
            width: 30px;
            height: 30px;
        }

        .webim-chatwindow {
            width: calc(100% - 310px);
        }
        .webim-msg-container .webim-avatar-icon.small{
            width: 30px;
            height: 30px;
            border-radius: 50%;
            overflow: hidden;
        }
        .webim-contact-item .webim-contact-info{
            line-height: 35px;
        }
        .webim-msg-container .left .webim-msg-value {
            background-color: #eeeeee;
            color: #666666;
        }
        .webim-msg-container .left .webim-msg-icon,.webim-msg-container .right .webim-msg-icon {
            display: none;
        }
        .webim-msg-container .left .webim-msg-value>pre {
            color: #666666;
        }

        .webim-msg-container .left > p ,.webim-msg-container .right > p{
           font-size: 10px;
        }
        .webim-msg-container .right .webim-msg-value {
            background-color: #2f9ff2;
        }

        .webim-msg-container .right .webim-msg-value>pre{
            color: #ffffff;
        }

block script
    script(src=__PLUGINS_PATH__ + '/webim/browser-polyfill.min.js')
    script(src=__PLUGINS_PATH__ + '/webim/webim.config.js')
    //再执行初始化之前我要先登录
    script(type="text/javascript").
        WebIM.config.autoSignInName = $.cookie("IMAccount");
        WebIM.config.autoSignInPwd = $.cookie("IMPwd");
    //script(src=__JS_PATH__ + '/webim/strophe-1.2.8.js')
    script(type="text/javascript" src= __PLUGINS_PATH__ + "/webim/strophe-1.2.8.js")
    script(src=__PLUGINS_PATH__ + '/webim/websdk-1.4.13.js')
    script(type="text/javascript").
        if (WebIM.config.isWebRTC) {
            document.write("<script src='./webrtc/dist/adapter.js'><\/script>");
            document.write("<script src='./webrtc/dist/webrtc-1.4.13.js'><\/script>");
        }
    script(src=__PLUGINS_PATH__ + "/webim/swfupload/swfupload.min.js")
    script(src=__PLUGINS_PATH__ + "/webim/demo-1.4.13.js")
    script(type="text/javascript" src=__JS_PATH__ + "/im.js")
